package git.代码实现.com.bw.test;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONException;

public class JSONUtils {
    public static void main(String[] args) {
        String json = "{\\\"common\\\":{\\\"ar\\\":\\\"310000\\\",\\\"ba\\\":\\\"iPhone\\\",\\\"ch\\\":\\\"Appstore\\\",\\\"md\\\":\\\"iPhone Xs Max\\\",\\\"mid\\\":\\\"mid_10\\\",\\\"os\\\":\\\"iOS 13.3.1\\\",\\\"uid\\\":\\\"399\\\",\\\"vc\\\":\\\"v2.1.134\\\"},\\\"start\\\":{\\\"entry\\\":\\\"icon\\\",\\\"loading_time\\\":5698,\\\"open_ad_id\\\":20,\\\"open_ad_ms\\\":9180,\\\"open_ad_skip_ms\\\":0},\\\"ts\\\":1741568061000}";
        System.out.println(isJSONValidate(json));
    }
    public static boolean isJSONValidate(String  obj) {
        try {
            JSON.parse(obj);
            return true;
        } catch (JSONException e) {
            return false;
        }
    }
}
